home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / cron.daily / find.notslocate < prev    next >
Encoding:
Text File  |  2006-06-29  |  419 b   |  20 lines

  1. #! /bin/sh
  2. #
  3. # cron script to update the `locatedb' database.
  4. #
  5. # Written by Ian A. Murdock <imurdock@debian.org> and 
  6. #            Kevin Dalley <kevin@aimnet.com>
  7.  
  8. LOCALUSER="nobody"
  9. export LOCALUSER
  10. if [ -f /etc/updatedb.conf ]; then
  11.   . /etc/updatedb.conf
  12. fi
  13.  
  14. if getent passwd $LOCALUSER > /dev/null ; then
  15.   cd / && nice -n ${NICE:-10} updatedb 2>/dev/null
  16. else
  17.   echo "User $LOCALUSER does not exist."
  18.   exit 1
  19. fi
  20.